A Formal Model and Specification Language for Procedure Calling Conventions

نویسندگان

  • Mark W. Bailey
  • Jack W. Davidson
چکیده

ly, data placement definitions are functions that map values onto machine resources. The functions take a value and corresponding attributes (such as data type) and decide where the value belongs. More precisely, placement definitions are finite state machines, since the mapping is order-dependent. Figure 2 illustrates an application of a placement definition to place procedure arguments. In this example, floating-point values are placed in even/odd register pairs, structures are placed on the stack, and integers are placed in the next available register. When argument registers are exhausted, the stack is used. The placement is complicated by restrictions. An example restriction is registers are that are passed over (i.e., an odd numbered register when placing a floating-point value) cannot be subsequently used. Such restrictions are common in real calling conventions, and must therefore be captured in the data placement definition. Figure 1: The Role of Agents in Procedure Call and Return Interfaces. Caller Caller Epilogue Agent Callee Epilogue Agent Callee Prologue Agent Caller Prologue Agent

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Formal Model and Specification Language for Procedure Calling Conventions 1

Procedure calling conventions are used to provide uniform procedure call interfaces. Applications, such as compilers and debug-gers, which generate, or process procedures at the machine-language abstraction level require knowledge of the calling convention. In this paper, we develop a formal model for procedure calling conventions called P-FSA's. Using this model, we are able to ensure several ...

متن کامل

Construction of Systems Software Using Specifications of Procedure Calling Conventions

The procedure calling convention impacts the operation of many system software components. The interface between procedures, which is established by the calling convention, facilitates separate compilation of program modules and interoperability of programming languages. The procedure calling convention dictates the way that program values are communicated, and how machine resources are shared ...

متن کامل

Staged Allocation: Engineering the Specification and Implementation of Procedure Calling Conventions

We present staged allocation, a new technique for specifying calling conventions. A specification written using staged allocation has a precise, formal semantics, and it can be executed directly inside a compiler. An implementation takes about 250 lines of ML or 650 lines of C++. Descriptions of nine calling conventions range in size from 15 to 30 lines each.

متن کامل

Custom Calling Conventions in a Portable Assembly Language

Calling conventions are so difficult to implement and maintain that people rarely experiment with alternatives. The primary sources of difficulty appear to be parameter passing and stack-frame layout. To implement parameter passing, we use the automata developed by Bailey and Davidson, but we have developed a new specification language that is implementable directly in the compiler. To implemen...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1994